extend personLeft.pug

block append pageStyle
	link(href='${relativePath}/static/css/personCenter/personData.css' type="text/css" rel="stylesheet")
	link(href='${relativePath}/static/css/personCenter/application.css' type="text/css" rel="stylesheet")
	link(href='${relativePath}/static/css/personCenter/personIndex.css' type="text/css" rel="stylesheet")
	link(href="${relativePath}/static/css/shopping/foundation.min.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/foundation-datepicker.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/personCenter/account.css" rel="stylesheet" type="text/css")
	link(href="${relativePath}/static/css/shopping/rightOrder.css" rel="stylesheet" type="text/css")
	link(href='${relativePath}/static/css/personCenter/myShop.css' type="text/css" rel="stylesheet")

block personRight
	div.rightContent.advContent.fl
		div.title 添加广告市场
		div.alChioce.clear
			label.fl.alBtn 已选：
			div.chioceBox.fl
				div.item.fl
					a.adv 中立广告市场
					img.sign(src="${relativePath}/static/imgs/sign.png")
		div.chiocBox
			div.item.fl
				a.adv.emptyadv(name="中立广告市场") 中立广告市场

		div.save 保存

block append pageScript
	script(type="text/javascript" src="${relativePath}/static/js/jquery.validate.min.js")
	script(type="text/javascript" src="${relativePath}/static/js/messages_zh.js")
	script(type="text/javascript" src="${relativePath}/static/js/card.js")

	script.
		
		$(function(){
			$("#myShop").addClass('current').siblings().removeClass('current')
			$(".ywc").removeClass('current')
			$(".emptyadv").click(function() {
				let ele = '<div class="item fl"><a href="javascript:;" class="adv">'+$(this).attr('name')+'</a><img class="sign" src="${relativePath}/static/imgs/sign.png"/></div>'
				$(".chioceBox").append(ele)
			})
			$.post(shopIp+'/tags/getMarketTags',{
				userToken:token,
				type:'market'
			},function(res) {
				console.log(res.data)
				var data = res.data
				for(let i=0;i<data.length;i++) {
					let ele = '<a class="adv emptyadv" name="中立广告市场">'+data[i]+'</a>'
					$(".emptyadv").append(ele)
				}
			})
		})


